package com.warrior.respository;

import com.warrior.entity.ActivityEntity;
import com.warrior.entity.UserActivityEntity;
import com.warrior.entity.UserEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Shawn on 2017/3/23.
 */
@Repository
public interface IUserActivityRepository extends JpaRepository<UserActivityEntity,String>,PagingAndSortingRepository<UserActivityEntity,String>{

    List<UserActivityEntity> findAllUserEntityByActivityByActivityIdAndStatus(ActivityEntity activityEntity,int status);

    List<UserActivityEntity> findAllUserEntityByActivityByActivityId(ActivityEntity activityEntity);

    List<UserActivityEntity> findAllActivityEntityByUserByUserIdAndStatus(UserEntity userEntity,int status);

    List<UserActivityEntity> findAllActivityEntityByUserByUserId(UserEntity userEntity);

}
